<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:p="http://primefaces.org/ui"
	lang="en">
	
	<ui:decorate template="/WEB-INF/facelets/faceletEditar.xhtml">
		<ui:define name="form">
			<h:form styleClass="form-horizontal">
				
				<p:messages id="mensagens"></p:messages>	
				
				<h:panelGroup>
					<h:outputLabel for="usuario" value="Usuário:"></h:outputLabel>
					<h:inputText id="usuario" value="#{credentials.username}"></h:inputText>
					
					<h:outputLabel for="senha" value="Senha:"></h:outputLabel>
					<h:inputSecret id="senha" value="#{credentials.password}"></h:inputSecret>
					
					<h:outputLabel for="confirmacao" value="Confirmação:"></h:outputLabel>
					<h:inputSecret id="confirmacao" value="#{LoginMB.confirmacao}"></h:inputSecret>
					
					<h:commandButton action="#{LoginMB.criarUsuario}" value="Criar"></h:commandButton>
					<br/>
					<h:commandButton id="login" value="LOGIN" action="#{identity.login}"/>
					<h:commandButton id="logout" value="LOGOUT" action="#{identity.logout}"/>
				</h:panelGroup>
			</h:form>
		</ui:define>
	</ui:decorate>
</html>